import { Define, EntityObjectFactory } from 'tiny-entity2';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
@Define.Table({ TableName: "organizationtree" })
export class OrganizationTree extends EntityObjectType<OrganizationTree>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    organizationId: string;

    @Define.Column({
        DataType: Define.DataType.BOOL
    })
    isRoot: boolean;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    parentId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    objectId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    objectName: string;

    object: any;
    
    accountpermits: any;

    parentObject: any;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    nodeName: string;

    @Define.Column({
        DataType: Define.DataType.BOOL
    })
    isDelete: boolean;
} 